//package me.ezitku.base.extensions
//
//import android.support.v4.app.Fragment
//import android.support.v4.app.FragmentActivity
//import com.my.datetimepicker.date.DatePickerDialog
//import com.my.datetimepicker.time.RadialPickerLayout
//import com.my.datetimepicker.time.TimePickerDialog
//import com.ug_project.system.*
//import com.ug_project.views.FONT_NAME
//
//fun FragmentActivity.createDatePickerDialog(year: Int = nowYear, month: Int = nowMonth - 1, day: Int = nowDay,
//                                            toYear: Int = 2000, fromYear: Int = 2037, listener: DateSelectListener.() -> Unit) {
//    var dateTimePicker = DatePickerDialog.newInstance(DateSelectListener().apply(listener), year, month, day, true)
//    dateTimePicker.setYearRange(toYear, fromYear)
//    dateTimePicker.defaultFontName = FONT_NAME
//    dateTimePicker.show(supportFragmentManager, "mTag")
//
//}
//
//fun FragmentActivity.createTimePickerDialog(hours: Int, minute: Int, listener: TimeSelectListener.() -> Unit) {
////    var dateTimePicker = DatePickerDialog.newInstance(DateSelectListener().apply(listener), year, month, day, true)
////    dateTimePicker.setYearRange(toYear, fromYear)
////    dateTimePicker.show(supportFragmentManager, "mTag")
//
//    var timePicker = TimePickerDialog.newInstance(TimeSelectListener().apply(listener), hours, minute, false)
//    timePicker.show(supportFragmentManager, "tag")
//
//}
//
//
//fun Fragment.createDatePickerDialog(year: Int = nowYear, month: Int = nowMonth - 1, day: Int = nowDay,
//                                    toYear: Int = 2000, fromYear: Int = 2037,
//                                    listener: DateSelectListener.() -> Unit) {
//
//    activity.createDatePickerDialog(year, month, day, toYear, fromYear, listener)
//}
//
//
//fun Fragment.createTimePickerDialog(hours: Int = nowHour, minute: Int = nowMinute, listener: TimeSelectListener.() -> Unit) {
//    activity.createTimePickerDialog(hours, minute, listener)
//}
//
//
//class DateSelectListener : DatePickerDialog.OnDateSetListener {
//    private var _onDateSet: ((p1: Int, p2: Int, p3: Int) -> Unit)? = null
//    override fun onDateSet(p0: DatePickerDialog?, p1: Int, p2: Int, p3: Int) {
//        _onDateSet?.invoke(p1, p2 + 1, p3)
//    }
//
//    fun selected(listener: (year: Int, month: Int, day: Int) -> Unit) {
//        _onDateSet = listener
//    }
//
//    fun result() {
//
//    }
//
//}
//
//class TimeSelectListener : TimePickerDialog.OnTimeSetListener {
//    private var _onTimeSet: ((p1: Int, p2: Int) -> Unit)? = null
//
//    override fun onTimeSet(p0: RadialPickerLayout, p1: Int, p2: Int) {
//        _onTimeSet?.invoke(p1,p2)
//    }
//
//
//    fun selected(listener: (hours: Int, minute: Int) -> Unit) {
//        _onTimeSet = listener
//    }
//
//    fun result() {
//
//    }
//
//}